#include <bits/stdc++.h>
using namespace std;

int main()
{
    string s;
    cin >> s;
    double res = 1;
    bool minus = false;

    if (s[0] == '-')
    {
        res *= 1.5;
        minus = true;
    }
    if ((s[s.length() - 1] - '0') % 2 == 0)
        res *= 2;
    int cnt = 0;
    for (unsigned int i = 0; i < s.length(); i++)
    {
        if (s[i] == '2')
            cnt++;
    }

    int b = minus == true ? s.length() - 1 : s.length();
    res *= cnt * 1.0 / b;
    res *= 100;
    printf("%.2lf%%\n", res);
    return 0;
}